package kr.co.tomatosystem.pde.tools.internal.marker;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.StructuredSelection;

public class FakeSelectionProvider implements ISelectionProvider {
	private List<Object> selection;

	public FakeSelectionProvider(List<Object> selection) {
		super();
		this.selection = selection;
	}

	public FakeSelectionProvider(Object... content) {
		this.selection = new ArrayList<Object>();
		selection.add(Arrays.asList(content));
	}

	@Override
	public void addSelectionChangedListener(ISelectionChangedListener listener) {

	}

	@Override
	public ISelection getSelection() {
		return new StructuredSelection(selection);
	}

	@Override
	public void removeSelectionChangedListener(ISelectionChangedListener listener) {

	}

	@Override
	public void setSelection(ISelection selection) {

	}

}
